using NUnit.Framework;
using DataAccessLayer;
using System;

[TestFixture]
public class CatalogFixture:ConnectionFixture
{
    private long labelId;
    private long artistId;
    private long genreId;
    private long reviewerId;

    private long recordingId;
    
    private long reviewId;   
    private long trackId;

    private LabelGateway labelGateway;
    private ArtistGateway artistGateway;
    private GenreGateway genreGateway;
    private ReviewerGateway reviewerGateway;

    private RecordingGateway recordingGateway;

    private ReviewGateway reviewGateway;
    private TrackGateway trackGateway;

    private RecordingDataSet recordingDataSet;
    private RecordingDataSet.RecordingRow loadedRecording;

    [SetUp]
    public void SetUp() {
        recordingDataSet = new RecordingDataSet();

        labelGateway = new LabelGateway(Connection);
        labelId = labelGateway.Insert("TestLabel", recordingDataSet);

        artistGateway = new ArtistGateway(Connection);
        artistId = artistGateway.Insert("TestArtist", recordingDataSet);

        genreGateway = new GenreGateway(Connection);
        genreId = genreGateway.Insert("TestGenre", recordingDataSet);

        reviewerGateway = new ReviewerGateway(Connection);
        reviewerId = reviewerGateway.Insert("TestReviewer", recordingDataSet);

        recordingGateway = new RecordingGateway(Connection);
        recordingId = recordingGateway.Insert("TestRecording", new DateTime(1999, 5, 12), artistId, labelId, recordingDataSet);

        reviewGateway = new ReviewGateway(Connection);
        reviewId = reviewGateway.Insert(30, "TestReview", recordingDataSet);

        trackGateway = new TrackGateway(Connection);
        trackId = trackGateway.Insert("TrackTitle", 300, recordingDataSet);


        RecordingDataSet.LabelRow labelRow = labelGateway.FindById(labelId, recordingDataSet);
        RecordingDataSet.ArtistRow artistRow = artistGateway.FindById(artistId, recordingDataSet);
        RecordingDataSet.GenreRow genreRow = genreGateway.FindById(genreId, recordingDataSet);
        RecordingDataSet.ReviewerRow reviewerRow = reviewerGateway.FindById(reviewerId, recordingDataSet);

        RecordingDataSet.RecordingRow recordingRow = recordingGateway.FindById(recordingId, recordingDataSet);

        RecordingDataSet.ReviewRow reviewRow = reviewGateway.FindById(reviewId, recordingDataSet);
        RecordingDataSet.TrackRow trackRow = trackGateway.FindById(trackId, recordingDataSet);


    }

    [TearDown]
    public void TearDown()
    {

    }
}

